package org.hxyjs.dto;

import java.io.IOException;
import java.util.Properties;

/**
 * 主要用于存放各种提示信息
 * @author:LG
 * @date:Created at 2019/03/09
 */
//一个消息类 有两种成员变量一种是小写的可以改变的变量（读取properties文件），第二种是大小的不能改变的变量（提供给DTO）
public class Messages {

    private static String getUserSuccess= "";
    private static String getUserFail= "";
    private static String addUserSuccess= "";
    private static String addUserFail= "";
    private static String deleteUserSuccess= "";
    private static String deleteUserFail= "";
    private static String updateUserSuccess= "";
    private static String updateUserFail= "";
    //用户
    private static String getMemberTypeSuccess= "";
    private static String getMemberTypeFail= "";
    private static String addMemberTypeSuccess= "";
    private static String addMemberTypeFail= "";
    private static String deleteMemberTypeSuccess= "";
    private static String deleteMemberTypeFail= "";
    private static String updateMemberTypeSuccess= "";
    private static String updateMemberTypeFail= "";
    //会员类型
    private static String getUserSchemeRecordSuccess= "";
    private static String getUserSchemeRecordFail= "";
    private static String addUserSchemeRecordSuccess= "";
    private static String addUserSchemeRecordFail= "";
    private static String deleteUserSchemeRecordSuccess= "";
    private static String deleteUserSchemeRecordFail= "";
    private static String updateUserSchemeRecordSuccess= "";
    private static String updateUserSchemeRecordFail= "";
    //积分
    private static String getIntegralSuccess= "";
    private static String getIntegralFail= "";
    private static String addIntegralSuccess= "";
    private static String addIntegralFail= "";
    private static String deleteIntegralSuccess= "";
    private static String deleteIntegralFail= "";
    private static String updateIntegralSuccess= "";
    private static String updateIntegralFail= "";




   static{
       Properties prop = new Properties();// 空的配置类
       try {
           prop.load(Messages.class.getResourceAsStream("/messages.properties"));// Object.class找到jvm运行的class文件所在的目录，
       } catch (IOException e) {
           e.printStackTrace();
       }
       // getResourceAsStream 以流的形式将文件读到内存，不写/ 根路径表示当前class所在的文件夹下面找文件 写
       // 根路径就是当前项目下面找文件 bin
       getUserSuccess = prop.get("getUserSuccess").toString();
       getUserFail = prop.get("getUserFail").toString();
       addUserSuccess = prop.get("addUserSuccess").toString();
       addUserFail = prop.get("addUserFail").toString();

       deleteUserSuccess = prop.get("deleteUserSuccess").toString();
       deleteUserFail = prop.get("deleteUserFail").toString();
       updateUserSuccess = prop.get("updateUserSuccess").toString();
       updateUserFail = prop.get("updateUserFail").toString();
        //用户
       getMemberTypeSuccess = prop.get("getMemberTypeSuccess").toString();
       getMemberTypeFail = prop.get("getMemberTypeFail").toString();
       addMemberTypeSuccess = prop.get("addMemberTypeSuccess").toString();
       addMemberTypeFail = prop.get("addMemberTypeFail").toString();

       deleteMemberTypeSuccess = prop.get("deleteMemberTypeSuccess").toString();
       deleteMemberTypeFail = prop.get("deleteMemberTypeFail").toString();
       updateMemberTypeSuccess = prop.get("updateMemberTypeSuccess").toString();
       updateMemberTypeFail = prop.get("updateMemberTypeFail").toString();
       //会员类型
       getUserSchemeRecordSuccess = prop.get("getUserSchemeRecordSuccess").toString();
       getUserSchemeRecordFail = prop.get("getUserSchemeRecordFail").toString();
       addUserSchemeRecordSuccess = prop.get("addUserSchemeRecordSuccess").toString();
       addUserSchemeRecordFail = prop.get("addUserSchemeRecordFail").toString();

       deleteUserSchemeRecordSuccess = prop.get("deleteUserSchemeRecordSuccess").toString();
       deleteUserSchemeRecordFail = prop.get("deleteUserSchemeRecordFail").toString();
       updateUserSchemeRecordSuccess = prop.get("updateUserSchemeRecordSuccess").toString();
       updateUserSchemeRecordFail = prop.get("updateUserSchemeRecordFail").toString();
       //积分
       getIntegralSuccess = prop.get("getIntegralSuccess").toString();
       getIntegralFail = prop.get("getIntegralFail").toString();
       addIntegralSuccess = prop.get("addIntegralSuccess").toString();
       addIntegralFail = prop.get("addIntegralFail").toString();

       deleteIntegralSuccess = prop.get("deleteIntegralSuccess").toString();
       deleteIntegralFail = prop.get("deleteIntegralFail").toString();
       updateIntegralSuccess = prop.get("updateIntegralSuccess").toString();
       updateIntegralFail = prop.get("updateIntegralFail").toString();




   }
    /*学生模块操作信息*/
    public final static String GETUSERSUCCESS= getUserSuccess;
    public final static String GETUSERFAIL= getUserFail;
    public final static String ADDUSERSUCCESS= addUserSuccess;
    public final static String ADDUSERFAIL= addUserFail;

    public final static String DELETEUSERSUCCESS= deleteUserSuccess;
    public final static String DELETEUSERFAIL= deleteUserFail;
    public final static String UPDATEUSERSUCCESS= updateUserSuccess;
    public final static String UPDATEUSERFAIL= updateUserFail;
    //用户
    public final static String GETMEMBERTYPESUCCESS= getMemberTypeSuccess;
    public final static String GETMEMBERTYPEFAIL= getMemberTypeFail;
    public final static String ADDMEMBERTYPESUCCESS= addMemberTypeSuccess;
    public final static String ADDMEMBERTYPEFAIL= addMemberTypeFail;

    public final static String DELETEMEMBERTYPESUCCESS= deleteMemberTypeSuccess;
    public final static String DELETEMEMBERTYPEFAIL= deleteMemberTypeFail;
    public final static String UPDATEMEMBERTYPESUCCESS= updateMemberTypeSuccess;
    public final static String UPDATEMEMBERTYPEFAIL= updateMemberTypeFail;
    //会员类型
    public final static String GETUSERSCHEMERECORDSUCCESS= getUserSchemeRecordSuccess;
    public final static String GETUSERSCHEMERECORDFAIL= getUserSchemeRecordFail;
    public final static String ADDUSERSCHEMERECORDSUCCESS= addUserSchemeRecordSuccess;
    public final static String ADDUSERSCHEMERECORDFAIL= addUserSchemeRecordFail;

    public final static String DELETEUSERSCHEMERECORDSUCCESS= deleteUserSchemeRecordSuccess;
    public final static String DELETEUSERSCHEMERECORDFAIL= deleteUserSchemeRecordFail;
    public final static String UPDATEUSERSCHEMERECORDSUCCESS= updateUserSchemeRecordSuccess;
    public final static String UPDATEUSERSCHEMERECORDFAIL= updateUserSchemeRecordFail;
    //积分
    public final static String GETINTEGRALSUCCESS= getUserSuccess;
    public final static String GETINTEGRALFAIL= getUserFail;
    public final static String ADDINTEGRALSUCCESS= addUserSuccess;
    public final static String ADDINTEGRALFAIL= addUserFail;

    public final static String DELETEINTEGRALSUCCESS= deleteUserSuccess;
    public final static String DELETEINTEGRALFAIL= deleteUserFail;
    public final static String UPDATEINTEGRALSUCCESS= updateUserSuccess;
    public final static String UPDATEINTEGRALFAIL= updateUserFail;


    public static void main(String[] args) {
        System.out.println(Messages.GETUSERSUCCESS);
    }
}
